import React, { Component } from 'react'
import Item from '../Item'
import "./index.css"

export default class List extends Component {
  render() {
    let {updateTodo, deleteTodo} = this.props;
    return (
      <div className="todo-list">
        {
          this.props.list.map(item => {
            return <Item key={item.id} {...item} updateTodo={updateTodo} deleteTodo={deleteTodo}  />
          })
        }
      </div>
    )
  }
}
